<template lang="">
    <div>
        <h1>我是E</h1>
        <button>emit</button>
    </div>
</template>
<script lang="ts" setup>
import { getCurrentInstance } from 'vue';
const instance = getCurrentInstance()


const Bus = (str:any)=>{
    console.log(str,'=======>F')
}

instance?.proxy?.$Bus.on('on-xiaoman',Bus) //监听

// instance?.proxy?.$Bus.off('on-xiaoman',Bus) //删除

// instance?.proxy?.$Bus.all.clear('on-xiaoman',Bus) //删除所有


// instance?.proxy?.$Bus.on('*',(type,str)=>{
//     console.log(type,str,'-------------B')
// })

// instance?.proxy?.$Bus.on('on-xiaoman',(str)=>{
//     console.log(str,'-------------B')
// })


</script>
<style lang="">
    
</style>